<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--公共页眉，并非是标准的html文档格式，
通过index.jsp中的 include file="/page/header.html" 将上述的公共文件引入进来，从而形成一个完整的页面；
并且，不会影响到其他页面对于公共文件的引用和使用；-->

<link rel="stylesheet" type="text/css" href="../kanbanniang/waifu.css"/>

<div class="waifu">
    <div class="waifu-tips"></div>
    <canvas id="live2d" class="live2d"></canvas>
    <div class="waifu-tool">
        <span class="fui-home"></span>
        <span class="fui-chat"></span>
        <span class="fui-eye"></span>
        <span class="fui-user"></span>
        <span class="fui-photo"></span>
        <span class="fui-info-circle"></span>
        <span class="fui-cross"></span>
    </div>
</div>

<script src="../kanbanniang/waifu-tips.js"></script>
<script src="..//kanbanniang/live2d.js"></script>

<script type="text/javascript">
    live2d_settings['modelId'] = 1;
    live2d_settings['modelTexturesId'] = 87;
    initModel("../kanbanniang/waifu-tips.json")
</script>
<script>
    $(function () {
        var $img = $(".get_ele img");
        var $a = $(".get_ele a");
        $.ajax({
            url: "${pageContext.servletContext.contextPath}/product/getHotList",
            success: function (date) {
                console.log(date.my_pro_list[1]);
                for (var i = 0; i < date.my_pro_list.length; i++) {
                    var obj = date.my_pro_list[i];
                    $img.eq(i).attr("src", "${pageContext.servletContext.contextPath}/statics/upprodectimg/" + obj.pimg);
                    $a.eq(i).attr("href", "${pageContext.servletContext.contextPath}/product/productinfo?pid=" + obj.pid);
                }
            }
        })
    })
</script>